import request from '@/utils/request'

// 查询出库单列表
export function listOutboundOrder(query) {
  return request({
    url: '/depot/outboundOrder/list',
    method: 'get',
    params: query
  })
}

// 查询出库单详细
export function getOutboundOrder(outboundId) {
  return request({
    url: '/depot/outboundOrder/' + outboundId,
    method: 'get'
  })
}

// 新增出库单
export function addOutboundOrder(data) {
  return request({
    url: '/depot/outboundOrder',
    method: 'post',
    data: data
  })
}

// 修改出库单
export function updateOutboundOrder(data) {
  return request({
    url: '/depot/outboundOrder',
    method: 'put',
    data: data
  })
}

// 修改出库单
export function confirmOutboundOrder(id) {
  return request({
    url: '/depot/outboundOrder/confirmOutboundOrder/' + id,
    method: 'put'
  })
}

// 删除出库单
export function delOutboundOrder(outboundId) {
  return request({
    url: '/depot/outboundOrder/' + outboundId,
    method: 'delete'
  })
}


// 查询未出库的出库单记录条数
export function getUnpairedOutBoundStats() {
  return request({
    url: '/depot/outboundOrder/count',
    method: 'get'
  })
}
